.xml - Run defined by global Start for the whole Run and adjacent boxes with only Width
The Run is universal Gantt object to show resizable and movable bars in one cell.
It has no special meaning in Gantt chart and is usually used in other charts and purposes than Gantt chart.
The advantages of the runs are especially various bar types (normal, solid, fixed, ...),
different texts and classes for individual bars inside one cell,
many options for moving and resizing the run bars, search for the bars inside whole chart.
To speed up the Run rendering, you can set Cfg attribute FastGantt='1', the look is slightly worse, but every Run box is done by one HTML tag.
The Run can be defined in two ways:
Independent boxes
are defined by only
GanttRun
attribute, every Run box is specified by its Start date and End date or by Start date and Width in GanttDataUnits.
You define only boxes, the spaces between boxes are added automatically.
Internally the Run is always defined as continuous, so between all not joined boxes is always one Empty type box.
To explicitly define space between boxes (e.g. to show text or colored background in the space) you must define the Empty box and the second box by Width only (like in the continuous definition), without Start date to not add new spaces between them.
To define joined boxes, you must also define the second and next boxes only by Width (like in the continuous definition), without Start date to not add spaces between them.
It is possible to define the boxes in random order, but there must be set GanttRunError='Sort'.
Remember, the GanttRunError='sort' on start slows down the initialization, because all the boxes must be sorted on start.
By default are the Run saved back with Start+End (if not defined GanttRunStart attribute).
To save Run by Start+Width set GanttRunSave='2'.
Continuous Run
is defined by start date for the whole Run in
GanttRunStart
and all bars adjacent defined in
GanttRun
by only the bar Width.
You must define all bars including spaces between them.
If two Run bars don't have Empty box between them, they are joined.
To define two not joined bars, you must include Empty box between them, even if they are adjacent.
To shorten the definition, the Empty box between adjacent bars can be added by completely empty definition (two semicolons) like "2,box;;2,box".
Empty type box can have also negative width to move the next box over the previous one.
GanttRun
attribute defines all boxes.
The boxes are separated by semicolon, the box attributes are separated by comma.
The box definition items must not contain these separators.
It is possible to define different separators by including them to the Run definition beginning.
The GanttRun definition is Start,End,Type,Text,Class,Tip,Id,Group or Start,Width,Type,Text,Class,Tip,Id,Group or Width,Type,Text,Class,Tip,Id,Group.
The Type specifies box features and permissions, if the box can be resized or moved.
The Type can be Box (standard box), Solid (not resizable), Fixed (not movable and resizable),
Left (fixed left), Right (fixed right), Empty (empty space between boxes, inactive),
Nbsp (empty space between joined boxes), Bound (not movable start or end), End (automatic movable start or end).
The Text specifies text displayed on the box. It can also display the box length or time formatted by GanttRunFormat.
The Class is CSS class for the box, there are 17 predefined classes for standard background colors.
The Class can be custom CSS class used for the box.
The Tip is tooltip displayed on mouse hover, it can be formatted by GanttRunTip and start and end dates of the box by GanttRunTipDateFormat.
The Id and Group identify the box for referencing it by API methods.